-- collections of all components.

--                      NAME             DEFAULT VALUES
--visual
EntitySystem.component("texture",        {image = nil, width = 1, heigth = 1})
EntitySystem.component("color",          {r = 0, g = 0, b = 0, a = 1})
EntitySystem.component("name",           {text = ""})
EntitySystem.component("animation",      {numFrames = 0, image = nil, turboImage = nil, width = 0, height = 0, grid = nil, name = "", anim = nil})
--HUD
EntitySystem.component("text",            {text = {}, x = {}, y = {}, color = {}})
EntitySystem.component("rectangle")
EntitySystem.component("hudImage")
  
--Audio
EntitySystem.component("audio",            {sound = nil, source = nil, volume = 1, loop = false, isPlaying = false, stream = "static"})
  
--spatial
EntitySystem.component("position",       Vector.new())
EntitySystem.component("shape",          {size = Vector.new(), form = "rect"})
  
--gamey
EntitySystem.component("type",           {name = "enemy", num = 1})
EntitySystem.component("health",         {value = 100})
EntitySystem.component("onDeath",        {action = nil, isDead = false, needsRun = false, hasRun = false, args = {}})
EntitySystem.component("spawn",          {entity = nil, loop = false, interval = 0, amount = 1})
EntitySystem.component("duration",       {remaining = 1})
EntitySystem.component("movement",       {speed = 0, turboSpeed = 0, turbo = false, speedUp = false, speedDown = false})
EntitySystem.component("sector",         {x = 0, y = 0})
EntitySystem.component("powerUp",        {colType = "rect", pType = 'normal', width = 0, height = 0, action = nil}) 

--Weapons
--Will be used to allow multiple weapons on a ship
EntitySystem.component("weapons",        {selection = 1})
EntitySystem.component("damage",         {amount = 1, hasColPlayer = false})
EntitySystem.component("reload",         {canFire = true, timer = 0, isFiring = false, speed = 0.2, cat = 3, typ = 1})
EntitySystem.component("disableTP",      {duration = 3, timer = 0})
  
--control
EntitySystem.component("inCam",          {mode="follow"})
EntitySystem.component("inputDirection", {up=false, down=false, left=false, right=false})
EntitySystem.component("ai",             {state = "wait"})
EntitySystem.component("trackPlayer",    {vert = 0, horz = 0, fireAngle = math.pi/2, pa = 0, turnSpeed = math.pi/2})

--Physics
EntitySystem.component("physics",        {bBox = nil, body = nil, category = 1, mask = nil, bodyType = "dynamic", startXVel = nil, startYVel = nil, startAngle = nil, density = 1, prevVx = nil, prevVy = nil})
EntitySystem.component("boundTo",        {entity = nil, jointType = "weld", joint = nil})
EntitySystem.component("boundToPlanet",  {joint = nil, angle = 0})